package com.stary.springmvc.web.homework;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Component
@RequestMapping("/log")
public class homeWokSenven {
    @RequestMapping( value = "/yof")
    public String login(@RequestParam(value = "user",required = false)Integer userId,
                        @RequestParam(value="password",required = true) String password){
        if(userId == 210103 && password.equals("gpy678615")){
            return "redirect:/homework/senven/success.jsp";
        }
       return "forward:/WEB-INF/homework/fail.jsp";

    }
}
